package com.example.customer;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.Optional;

@Repository
public interface CustomerRepository extends JpaRepository<Customer, Integer> {
    // 等价于 select * from customer where email = "XX@XXX(下面参数email的值)"
    Optional<Customer> findByEmail(String email);
}